package io.chenglicun.modules.evaluation.service.impl;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.chenglicun.common.service.impl.CrudServiceImpl;
import io.chenglicun.common.constant.Constant;
import io.chenglicun.modules.evaluation.dao.ClcTypeStandardDao;
import io.chenglicun.modules.evaluation.dto.ClcTypeStandardDTO;
import io.chenglicun.modules.evaluation.entity.ClcTypeStandardEntity;
import io.chenglicun.modules.evaluation.service.ClcTypeStandardService;
import io.chenglicun.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 测评模板类别标准
 *
 * @author HB 137664951@qq.com
 * @since 1.0 2023-11-28
 */
@Service
public class ClcTypeStandardServiceImpl extends CrudServiceImpl<ClcTypeStandardDao, ClcTypeStandardEntity, ClcTypeStandardDTO> implements ClcTypeStandardService {

    @Override
    public QueryWrapper<ClcTypeStandardEntity> getWrapper(Map<String, Object> params){
        QueryWrapper<ClcTypeStandardEntity> wrapper = new QueryWrapper<>();

        Object typeId = params.get("typeId");
        wrapper.eq(ObjectUtil.isNotEmpty(typeId), "type_id", typeId);

        return wrapper;
    }


}